function t(e) {
    a.showLoading("正在加载数据"), wx.request({
        url: o.globalData.host + "/lotto/v2/list",
        method: "GET",
        dataType: "json",
        data: {
            access_token: a.getStorage("accessToken"),
            type: 1,
            page: e.data.page,
            count: 10
        },
        success: function(o) {
            if (a.hideLoading(), -500 != o.data.sta) if (0 == o.data.sta) {
                var s = o.data.data, i = e.data.page, n = !1;
                10 == s.length && (n = !0);
                for (var l = 0; l < s.length; l++) 0 != s[l].date && (s[l].date = a.formatDate(1e3 * s[l].date, "MM/dd HH:mm"));
                e.setData({
                    lottoList: 1 == i ? s : e.data.lottoList.concat(s),
                    page: i + 1,
                    moreData: n
                });
            } else a.showFailedToast("数据加载失败", o.data.msg); else a.login(function() {
                t(e);
            });
        },
        fail: function(t) {
            console.log(t);
        }
    });
}

var a = require("../../utils/util.js"), e = require("../../tmp/tmp.js"), o = getApp();

Page({
    data: {
        lottoList: null,
        page: 1,
        moreData: !1,
        type: 1
    },
    onLoad: function(t) {
        e.enRoll(this);
    },
    onShow: function() {
        this.setData({
            toDetail: !1,
            page: 1
        }), t(this);
    },
    onReachBottom: function() {
        this.data.moreData && t(this);
    }
});